using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_BankrollItemTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HL_BankrollItemTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HL_BankrollItemTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HL_BankrollItem";
			dataTableMapping.ColumnMappings.Add("ItemID", "ItemID");
			dataTableMapping.ColumnMappings.Add("SalerID", "SalerID");
			dataTableMapping.ColumnMappings.Add("DateAndTime", "DateAndTime");
			dataTableMapping.ColumnMappings.Add("Money", "Money");
			dataTableMapping.ColumnMappings.Add("MoneyType", "MoneyType");
			dataTableMapping.ColumnMappings.Add("CurrencyType", "CurrencyType");
			dataTableMapping.ColumnMappings.Add("eBankID", "eBankID");
			dataTableMapping.ColumnMappings.Add("Income_PayOut", "Income_PayOut");
			dataTableMapping.ColumnMappings.Add("OrderFormID", "OrderFormID");
			dataTableMapping.ColumnMappings.Add("PaymentID", "PaymentID");
			dataTableMapping.ColumnMappings.Add("Remark", "Remark");
			dataTableMapping.ColumnMappings.Add("UserID", "UserID");
			dataTableMapping.ColumnMappings.Add("Bank", "Bank");
			dataTableMapping.ColumnMappings.Add("Status", "Status");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HLShop_BankrollItem] WHERE (([ItemID] = @Original_ItemID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_ItemID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ItemID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HLShop_BankrollItem] ([UserID], [SalerID], [DateAndTime], [Money], [MoneyType], [CurrencyType], [eBankID], [Bank], [Income_PayOut], [OrderFormID], [PaymentID], [Remark], [Status]) VALUES (@UserID, @SalerID, @DateAndTime, @Money, @MoneyType, @CurrencyType, @eBankID, @Bank, @Income_PayOut, @OrderFormID, @PaymentID, @Remark, @Status)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SalerID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@DateAndTime", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "DateAndTime", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Money", SqlDbType.Decimal, 0, ParameterDirection.Input, 19, 2, "Money", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@MoneyType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "MoneyType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@CurrencyType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "CurrencyType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@eBankID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "eBankID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Bank", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Bank", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Income_PayOut", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Income_PayOut", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OrderFormID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OrderFormID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PaymentID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PaymentID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Remark", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Status", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Status", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HLShop_BankrollItem] SET [UserID] = @UserID, [SalerID] = @SalerID, [DateAndTime] = @DateAndTime, [Money] = @Money, [MoneyType] = @MoneyType, [CurrencyType] = @CurrencyType, [eBankID] = @eBankID, [Bank] = @Bank, [Income_PayOut] = @Income_PayOut, [OrderFormID] = @OrderFormID, [PaymentID] = @PaymentID, [Remark] = @Remark, [Status] = @Status WHERE (([ItemID] = @Original_ItemID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SalerID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@DateAndTime", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "DateAndTime", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Money", SqlDbType.Decimal, 0, ParameterDirection.Input, 19, 2, "Money", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@MoneyType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "MoneyType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@CurrencyType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "CurrencyType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@eBankID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "eBankID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Bank", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Bank", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Income_PayOut", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Income_PayOut", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OrderFormID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OrderFormID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PaymentID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PaymentID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Remark", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Status", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Status", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_ItemID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ItemID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[6];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT ItemID, UserID, SalerID, DateAndTime, Money, MoneyType, CurrencyType, \r\n      eBankID, Bank, Income_PayOut, OrderFormID, PaymentID, Remark, Status\r\nFROM HLShop_BankrollItem";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "DELETE  [HLShop_BankrollItem] WHERE [ItemID]   in\r\n(SELECT * FROM fn_Split(@ArrayItemID,','))";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@ArrayItemID", SqlDbType.VarChar, 1024, ParameterDirection.Input, 0, 0, "", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "Pr_GetBankrollItemByDateIDBankUserID";
			this._commandCollection[2].CommandType = CommandType.StoredProcedure;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@SalerName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@Bank", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@BeginDate", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@EndDate", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@MoneyType", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@Income_PayOut", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "Pr_GetBankrollItemByDateIDBankUserIDSalerID";
			this._commandCollection[3].CommandType = CommandType.StoredProcedure;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@UserName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@Bank", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@BeginDate", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@EndDate", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@MoneyType", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@Income_PayOut", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "SELECT Bank, CurrencyType, DateAndTime, Income_PayOut, ItemID, Money, MoneyType, OrderFormID, PaymentID, Remark, SalerID, Status, UserID, eBankID FROM HLShop_BankrollItem WHERE (ItemID = @ItemID)";
			this._commandCollection[4].CommandType = CommandType.Text;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@ItemID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ItemID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "SELECT HLShop_BankrollItem.ItemID, HLShop_BankrollItem.UserID, \r\n      HLShop_BankrollItem.SalerID, HLShop_BankrollItem.DateAndTime, \r\n      HLShop_BankrollItem.Money, HLShop_BankrollItem.MoneyType, \r\n      HLShop_BankrollItem.CurrencyType, HLShop_BankrollItem.eBankID, \r\n      HLShop_BankrollItem.Income_PayOut, HLShop_BankrollItem.OrderFormID, \r\n      HLShop_BankrollItem.PaymentID, HLShop_BankrollItem.Remark,HLShop_BankrollItem.Status, \r\n      HL_User.UserName         \r\nFROM HLShop_BankrollItem INNER JOIN\r\n      HL_User ON HLShop_BankrollItem.UserID = HL_User.UserID\r\nWHERE HLShop_BankrollItem.Income_PayOut!=2 and  (OrderFormID = @OrderFormID)";
			this._commandCollection[5].CommandType = CommandType.Text;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@OrderFormID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "OrderFormID", DataRowVersion.Current, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_BankrollItem.HL_BankrollItemDataTable GetAllBankrollItem()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_BankrollItem.HL_BankrollItemDataTable hL_BankrollItemDataTable = new S_BankrollItem.HL_BankrollItemDataTable();
			this.Adapter.Fill(hL_BankrollItemDataTable);
			return hL_BankrollItemDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_BankrollItem.HL_BankrollItemDataTable GetBankrollItemByDateIDBankUserID(int? UserID, string SalerName, int? Bank, string BeginDate, string EndDate, int? MoneyType, int? Income_PayOut)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (SalerName == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = SalerName;
			}
			if (Bank.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = Bank.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (BeginDate == null)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = BeginDate;
			}
			if (EndDate == null)
			{
				this.Adapter.SelectCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[5].Value = EndDate;
			}
			if (MoneyType.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[6].Value = MoneyType.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (Income_PayOut.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[7].Value = Income_PayOut.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[7].Value = System.DBNull.Value;
			}
			S_BankrollItem.HL_BankrollItemDataTable hL_BankrollItemDataTable = new S_BankrollItem.HL_BankrollItemDataTable();
			this.Adapter.Fill(hL_BankrollItemDataTable);
			return hL_BankrollItemDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_BankrollItem.HL_BankrollItemDataTable GetBankrollItemByDateIDBankUserIDSalerID(int? SalerID, string UserName, int? Bank, string BeginDate, string EndDate, int? MoneyType, int? Income_PayOut)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			if (SalerID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = SalerID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (UserName == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = UserName;
			}
			if (Bank.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = Bank.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (BeginDate == null)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = BeginDate;
			}
			if (EndDate == null)
			{
				this.Adapter.SelectCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[5].Value = EndDate;
			}
			if (MoneyType.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[6].Value = MoneyType.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (Income_PayOut.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[7].Value = Income_PayOut.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[7].Value = System.DBNull.Value;
			}
			S_BankrollItem.HL_BankrollItemDataTable hL_BankrollItemDataTable = new S_BankrollItem.HL_BankrollItemDataTable();
			this.Adapter.Fill(hL_BankrollItemDataTable);
			return hL_BankrollItemDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_BankrollItem.HL_BankrollItemDataTable GetBankrollItemByItemID(int ItemID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			this.Adapter.SelectCommand.Parameters[0].Value = ItemID;
			S_BankrollItem.HL_BankrollItemDataTable hL_BankrollItemDataTable = new S_BankrollItem.HL_BankrollItemDataTable();
			this.Adapter.Fill(hL_BankrollItemDataTable);
			return hL_BankrollItemDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_BankrollItem.HL_BankrollItemDataTable GetBanKrollItemByOrderFormID(int? OrderFormID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[5];
			if (OrderFormID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = OrderFormID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			S_BankrollItem.HL_BankrollItemDataTable hL_BankrollItemDataTable = new S_BankrollItem.HL_BankrollItemDataTable();
			this.Adapter.Fill(hL_BankrollItemDataTable);
			return hL_BankrollItemDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_BankrollItem.HL_BankrollItemDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_BankrollItem dataSet)
		{
			return this.Adapter.Update(dataSet, "HL_BankrollItem");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteBankrollItem(string ArrayItemID)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			if (ArrayItemID == null)
			{
				throw new System.ArgumentNullException("ArrayItemID");
			}
			sqlCommand.Parameters[0].Value = ArrayItemID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
